package route

import (
	"github.com/gin-gonic/gin"
	"nnxy-search-api/search-public-api/api/notify"
	"nnxy-search-api/search-public-api/middleware"
)

// InitNotifyRoute 公告
func InitNotifyRoute(router *gin.RouterGroup) {
	r := router.Group("notice")
	{
		r.GET("", notify.List)
		r.GET("/:id", notify.Detail)
		r.POST("", notify.New).Use(middleware.JwtAuth())
		r.PUT("/:id", notify.Update).Use(middleware.JwtAuth())
		r.DELETE("/:id", notify.Delete).Use(middleware.JwtAuth())
	}
}
